<template>
  <van-popover
    v-model="showPopover"
    trigger="click"
    :actions="actions"
    placement="bottom-end"
    @select="onSelect"
    overlay
  >
    <template #reference>
      <van-button
        type="primary"
        style="background-color: #fff; border: #fff; width: 30px; height: 25px"
      >
        <van-icon name="warning" size="25" />
      </van-button>
    </template>
  </van-popover>
</template>

<script>
export default {
  data() {
    return {
      showPopover: false,
      actions: [{ text: "选项一" }, { text: "选项二" }, { text: "选项三" }],
    };
  },
  methods: {
    onSelect(action) {
      console.log(action.text);
    },
  },
};
</script>

<style lang="less"></style>
